package com.settlement.system.controller;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.service.IBaseService;
import com.settlement.system.common.util.common.FasUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import com.settlement.system.model.entity.common.TblAkcPastAfterSaleDetail;
import jakarta.annotation.Resource;
import com.settlement.system.service.ITblAkcPastAfterSaleDetailService;

import java.util.Map;

/**
 * 爱库存-往期售后明细 前端控制器
 * @author Ximi
 * @since 2020-06-16
 */

@Api(tags = "爱库存-往期售后明细",description = "爱库存-往期售后明细")
@RestController
@RequestMapping("/akc/past_after_sale_detail")
public class TblAkcPastAfterSaleDetailController extends MergeApiExcelController<TblAkcPastAfterSaleDetail, Map<String,Object>> {

    @Resource
    private ITblAkcPastAfterSaleDetailService tblAkcPastAfterSaleDetailService;

    @Override
    public IBaseService init() {
        return tblAkcPastAfterSaleDetailService;
    }

    @Override
    public Class<?> getModelClass() {
        return TblAkcPastAfterSaleDetail.class;
    }

    @Override
    protected void setParamsModel(Map<String, Object> model) {
        FasUtil.formatInQueryCondition(model,"shopNo","originId");
        super.setParamsModel(model);
    }

    @Override
    protected void setFootModel(Map<String, Object> result, Map<String, Object> model) throws ServiceException {
        result.put("foot",tblAkcPastAfterSaleDetailService.getFoot(model));
    }
}

